package cn.bgs.wjx.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

@Data
@EqualsAndHashCode(callSuper = false)
public class AnnouncementVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "公式公告表id")
    private Integer announcementId;

    @ApiModelProperty(value = "小区id")
    private Integer communityId;

    @ApiModelProperty(value = "主题")
    private String theTheme;

    @ApiModelProperty(value = "内容")
    private String content;

    @ApiModelProperty(value = "作者")
    private String theAuthor;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @ApiModelProperty(value = "公告开始时间")
    private LocalDateTime startTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm",timezone = "GMT+8")
    @ApiModelProperty(value = "公告结束时间")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "类型（一般、紧急、非常紧急）")
    private String type;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")//DateTimeFormat 是入参格式化；
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty(value = "创建时间")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime updateTime;
}
